#include <iostream>
#include <fstream>
using namespace std;

int main()
{
	ifstream input("scores.txt");

	if (input.fail())
	{
		cout << "File does not exist" << endl;
		cout << "Exit program" << endl;

		system("pause");
		return 0;
	}

	double sum = 0;
	double number;
	while (input >> number)
	{
		cout << number << " ";
		sum += number;
	}

	input.close();

	cout << "\nSum is  " << sum << endl;

	system("pause");
	return 0;
}
